VERSION 5.00 Begin VB.Form frmMain BorderStyle = 0 'None Caption = "Form1" ClientHeight = 3435 ClientLeft = 0 ClientTop = 0 ClientWidth = 6345 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3435 ScaleWidth = 6345 ShowInTaskbar = 0 'False StartUpPosition = 2 'CenterScreen Begin VB.Line Line3 Tag = "1" X1 = 4500 X2 = 3180 Y1 = 2640 Y2 = 2640 End Begin VB.Line Line2 Tag = "1" X1 = 3960 X2 = 3180 Y1 = 2280 Y2 = 2640 End Begin VB.Label Label1 Alignment = 2 'Center BackStyle = 0 'Transparent Caption = "I'm Nigel. I'm nice!" BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 855 Left = 4200 TabIndex = 0 Tag = "1" Top = 1800 Width = 1515 End Begin VB.Shape Shape9 BackColor = &H0080FFFF& BackStyle = 1 'Opaque BorderWidth = 2 FillColor = &H00C0FFFF& Height = 1155 Left = 3960 Shape = 2 'Oval Top = 1560 Width = 1935 End Begin VB.Line Line1 Tag = "1" X1 = 720 X2 = 3120 Y1 = 2940 Y2 = 2940 End Begin VB.Shape Shape8 BackStyle = 1 'Opaque FillStyle = 3 'Vertical Line Height = 495 Left = 720 Shape = 4 'Rounded Rectangle Top = 2700 Width = 2415 End Begin VB.Shape Shape7 FillStyle = 0 'Solid Height = 495 Left = 1440 Shape = 2 'Oval Top = 1800 Width = 495 End Begin VB.Shape Shape6 FillStyle = 0 'Solid Height = 855 Left = 2040 Shape = 2 'Oval Top = 840 Width = 975 End Begin VB.Shape Shape5 FillStyle = 0 'Solid Height = 975 Left = 420 Shape = 2 'Oval Top = 720 Width = 975 End Begin VB.Shape Shape1 FillColor = &H00FFFFC0& FillStyle = 0 'Solid Height = 1575 Left = 120 Shape = 2 'Oval Top = 120 Width = 1455 End Begin VB.Shape Shape3 FillColor = &H00FFFFC0& FillStyle = 0 'Solid Height = 1695 Left = 1920 Shape = 2 'Oval Top = 120 Width = 1815 End Begin VB.Shape Shape4 FillStyle = 0 'Solid Height = 1815 Left = 0 Shape = 2 'Oval Top = 0 Width = 1695 End Begin VB.Shape Shape2 FillStyle = 0 'Solid Height = 1935 Left = 1800 Shape = 2 'Oval Top = 0 Width = 2055 End Attribute VB_Name = "frmMain" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long Private Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long Private Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long Private Type POINTAPI X As Long Y As Long End Type Const Shape_Rectange = 0 Const Shape_Square = 1 Const Shape_Oval = 2 Const Shape_Circle = 3 Const Shape_RndRectange = 4 Const Shape_RndSquare = 4 Const conHwndTopmost = -1 Const conHwndNoTopmost = -2 Const RGN_AND = 1 Const RGN_COPY = 5 Const RGN_DIFF = 4 Const RGN_OR = 2 Const RGN_XOR = 3 Dim MousePos As POINTAPI Dim DoDrag As Boolean, Dp As POINTAPI Private Sub Form_Load() AlwaysOnTop True Dim t, elipHnd(999999) As Long Dim n As Integer, eod As Integer n = -1 eod = 0 For Each t In frmMain If t.Tag <> "1" Then n = n + 1 eod = eod + 1 Select Case t Case Shape_Rectange: elipHnd(n) = CreateRectRgn(t.Left / 15, t.Top / 15, (t.Left + t.Width) / 15, (t.Top + t.Height) / 15) Case Shape_Oval: elipHnd(n) = CreateEllipticRgn(t.Left / 15, t.Top / 15, (t.Left + t.Width) / 15, (t.Top + t.Height) / 15) Case Shape_RndRectange: elipHnd(n) = CreateRoundRectRgn(t.Left / 15, t.Top / 15, (t.Left + t.Width) / 15, (t.Top + t.Height) / 15, 10, 10) End Select If (eod = 2) And (n = 1) Then CombineRgn elipHnd(0), elipHnd(1), elipHnd(0), RGN_OR eod = 0 End If If (eod = 2) And (n <> 1) Then CombineRgn elipHnd(n - 2), elipHnd(n - 1), elipHnd(n), RGN_OR CombineRgn elipHnd(0), elipHnd(0), elipHnd(n - 2), RGN_OR eod = 0 End If End If Next t SetWindowRgn Me.hwnd, elipHnd(0), True End Sub Private Sub AlwaysOnTop(TOF As Boolean) If TOF = True Then ' Turn on the TopMost attribute. SetWindowPos hwnd, conHwndTopmost, 0, 0, 0, 0, 3 Else ' Turn off the TopMost attribute. SetWindowPos hwnd, conHwndNoTopmost, 0, 0, 0, 0, 3 End If End Sub Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 Then Me.MousePointer = vbSizePointer Dp.X = X Dp.Y = Y DoDrag = True End If End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If DoDrag Then Me.Move Me.Left + X - Dp.X, Me.Top + Y - Dp.Y End Sub Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) DoDrag = False Me.MousePointer = Default End Sub